// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/js/rem' //引入rem
import store from './store'
import './assets/js/vant' //导入vant

import Bridge from './assets/js/bridge' //引入webviewbridge
Vue.prototype.$bridge = Bridge

// 全局引入qs  axios-》post使用
import qs from 'qs'
Vue.prototype.qs = qs

// axios.js
import axios from './axios/axios'
Vue.prototype.$axios = axios;

// 引入vue-video-player视频播放插件
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')
Vue.use(VideoPlayer)

router.beforeEach((to, from, next) => {
    /* 路由发生变化修改页面title */
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
});

Vue.config.productionTip = false

// 导入默认css
import './assets/css/root.css'

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: {
        App
    },
    template: '<App/>'
})